Sample adaptive offset (sao) parameter signaling

ABSTRACT

A method for sample adaptive offset (SAO) filtering and SAO parameter signaling in a video encoder is provided that includes determining SAO parameters for largest coding units (LCUs) of a reconstructed picture, wherein the SAO parameters include an indicator of an SAO filter type and a plurality of SAO offsets, applying SAO filtering to the reconstructed picture according to the SAO parameters, and entropy encoding LCU specific SAO information for each LCU of the reconstructed picture in an encoded video bit stream, wherein the entropy encoded LCU specific SAO information for the LCUs is interleaved with entropy encoded data for the LCUs in the encoded video bit stream. Determining SAO parameters may include determining the LCU specific SAO information to be entropy encoded for each LCU according to an SAO prediction protocol.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/243,044, filed Apr. 28, 2021 (scheduled to issue as U.S. Pat. No.11,606,580), which is a continuation of U.S. patent application Ser. No.16/741,611, filed Jan. 13, 2020 (now U.S. Pat. No. 11,025,960), which isa continuation of U.S. patent application Ser. No. 16/056,215, filedAug. 6, 2018, (now U.S. Pat. No. 10,536,722), which is a continuation ofU.S. patent application Ser. No. 13/593,973 filed Aug. 24, 2012, (nowU.S. Pat. No. 10,070,152), which claims the benefit of U.S. ProvisionalPatent Application No. 61/526,931, filed Aug. 24, 2011, and U.S.Provisional Patent Application No. 61/577,969, filed Dec. 20, 2011, bothof which are incorporated herein by reference in their entirety. Thisapplication is related to application Ser. No. 14/338,693, filed Jul.23, 2014 (now U.S. Pat. No. 8,923,407) which is incorporated herein byreference in its entirety.

BACKGROUND OF THE INVENTION Field of the Invention

Embodiments of the present invention generally relate to sample adaptiveoffset (SAO) parameter signaling in video coding.

Description of the Related Art

The Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T WP3/16and ISO/IEC JTC 1/SC 29/WG 11 is currently developing thenext-generation video coding standard referred to as High EfficiencyVideo Coding (HEVC). Similar to previous video coding standards such asH.264/AVC, HEVC is based on a hybrid coding scheme using block-basedprediction and transform coding. First, the input signal is split intorectangular blocks that are predicted from the previously decoded databy either motion compensated (inter) prediction or intra prediction. Theresulting prediction error is coded by applying block transforms basedon an integer approximation of the discrete cosine transform, which isfollowed by quantization and coding of the transform coefficients. WhileH.264/AVC divides a picture into fixed size macroblocks of 16×16samples, HEVC divides a picture into largest coding units (LCUs), of16×16, 32×32 or 64×64 samples. The LCUs may be further divided intosmaller blocks, i.e., coding units (CU), using a quad-tree structure. ACU may be split further into prediction units (PUs) and transform units(TUs). The size of the transforms used in prediction error coding canvary from 4×4 to 32×32 samples, thus allowing larger transforms than inH.264/AVC, which uses 4×4 and 8×8 transforms. As the optimal size of theabove mentioned blocks typically depends on the picture content, thereconstructed picture is composed of blocks of various sizes, each blockbeing coded using an individual prediction mode and the prediction errortransform.

In a coding scheme that uses block-based prediction, transform coding,and quantization, some characteristics of the compressed video data maydiffer from the original video data. For example, discontinuitiesreferred to as blocking artifacts can occur in the reconstructed signalat block boundaries. Further, the intensity of the compressed video datamay be shifted. Such intensity shift may also cause visual impairmentsor artifacts. To help reduce such artifacts in decompressed video, theemerging HEVC standard defines three in-loop filters: a deblockingfilter to reduce blocking artifacts, a sample adaptive offset filter(SAO) to reduce distortion caused by intensity shift, and an adaptiveloop filter (ALF) to minimize the mean squared error (MSE) betweenreconstructed video and original video. These filters may be appliedsequentially, and, depending on the configuration, the SAO and ALF loopfilters may be applied to the output of the deblocking filter.

SUMMARY

Embodiments of the present invention relate to methods, apparatus, andcomputer readable media for sample adaptive offset (SAO) filtering andSAO parameter signaling. In one aspect, a method for sample adaptiveoffset (SAO) filtering and SAO parameter signaling in a video encoder isprovided that includes determining SAO parameters for largest codingunits (LCUs) of a reconstructed picture, wherein the SAO parametersinclude an indicator of an SAO filter type and a plurality of SAOoffsets, applying SAO filtering to the reconstructed picture accordingto the SAO parameters, and entropy encoding LCU specific SAO informationfor each LCU of the reconstructed picture in an encoded video bitstream, wherein the encoded LCU specific SAO information for the LCUs isinterleaved with entropy encoded data for the LCUs in the encoded videobit stream. Determining SAO parameters may include determining the LCUspecific SAO information to be entropy encoded for each LCU according toan SAO prediction protocol.

In one aspect, a method for sample adaptive offset (SAO) filtering in avideo decoder is provided that includes entropy decoding LCU specificSAO information for an LCU from an encoded video bit stream, determiningSAO parameters for the LCU from the LCU specific SAO information, andapplying SAO filtering to the reconstructed picture according to the SAOparameters, wherein encoded LCU specific SAO information for LCUs of apicture is interleaved with entropy encoded data for the LCUs in theencoded video bit stream. Determining SAO parameters may includedetermining values of the SAO parameters from the LCU specific SAOinformation for the LCU according to an SAO prediction protocol.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments will now be described, by way of example only,and with reference to the accompanying drawings:

FIG. 1 illustrates band offset (BO) classification in sample adaptiveoffset (SAO) filtering;

FIG. 2A illustrates edge offset (EO) classification patterns in SAOfiltering;

FIG. 2B illustrates edge types by EO category;

FIG. 3 is an example of prior art signaling of slice based SAO parametersignaling;

FIG. 4 is an example of largest coding unit (LCU) based SAO parametersignaling;

FIG. 5 is a block diagram of a digital system;

FIG. 6 is a block diagram of a video encoder;

FIG. 7 is a block diagram of the in-loop filter component of the videoencoder;

FIG. 8 is a block diagram of a video decoder;

FIG. 9 is a block diagram of the in-loop filter component of the videodecoder;

FIG. 10 is a flow diagram of a method for SAO signaling in an encoder;

FIG. 11 is an example of spatially neighboring LCUs for SAO parameterprediction;

FIG. 12 is a flow diagram of a method for SAO filtering in a decoder;and

FIG. 13 is a block diagram of an illustrative digital system.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Specific embodiments of the invention will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

As used herein, the term “picture” may refer to a frame or a field of aframe. A frame is a complete image captured during a known timeinterval. For convenience of description, embodiments are describedherein in reference to HEVC. One of ordinary skill in the art willunderstand that embodiments of the invention are not limited to HEVC. InHEVC, a largest coding unit (LCU) is the base unit used for block-basedcoding. A picture is divided into non-overlapping LCUs. That is, an LCUplays a similar role in coding as the macroblock of H.264/AVC, but itmay be larger, e.g., 32×32, 64×64, etc. An LCU may be partitioned intocoding units (CU). A CU is a block of pixels within an LCU and the CUswithin an LCU may be of different sizes. The partitioning is a recursivequadtree partitioning. The quadtree is split according to variouscriteria until a leaf is reached, which is referred to as the codingnode or coding unit. The maximum hierarchical depth of the quadtree isdetermined by the size of the smallest CU (SCU) permitted. The codingnode is the root node of two trees, a prediction tree and a transformtree. A prediction tree specifies the position and size of predictionunits (PU) for a coding unit. A transform tree specifies the positionand size of transform units (TU) for a coding unit. A transform unit maynot be larger than a coding unit and the size of a transform unit may be4×4, 8×8, 16×16, and 32×32. The sizes of the transforms units andprediction units for a CU are determined by the video encoder duringprediction based on minimization of rate/distortion costs.

Various versions of HEVC are described in the following documents, whichare incorporated by reference herein: T. Wiegand, et al., “WD3: WorkingDraft 3 of High-Efficiency Video Coding,” JCTVC-E603, JointCollaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG11, Geneva, CH, March 16-23, 2011 (“WD3”), B. Bross,et al., “WD4: Working Draft 4 of High-Efficiency Video Coding,”JCTVC-F803_d6, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Torino, IT, Jul. 14-22, 2011(“WD4”), B. Bross. et al., “WD5: Working Draft 5 of High-EfficiencyVideo Coding,” JCTVC-G1103_d9, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Geneva, CH, Nov.21-30, 2011 (“WD5”), B. Bross, et al., “High Efficiency Video Coding(HEVC) Text Specification Draft 6,” JCTVC-H1003, Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG1, Geneva, CH, Nov. 21-30, 2011 (“HEVC Draft 6”), B. Bross,et al., “High Efficiency Video Coding (HEVC) Text Specification Draft7,” JCTVC-11003_d0, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG1, Geneva, CH, Apr. 17-May 7,2012 (“HEVC Draft 7”), and B. Bross, et al., “High Efficiency VideoCoding (HEVC) Text Specification Draft 8,” JCTVC-J1003_d7, JointCollaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG1, Stockholm, SE, Jul. 11-20, 2012 (“HEVC Draft 8”).

As previously mentioned, a sample adaptive offset (SAO) in-loop filteris one of the in-loop filters included in the emerging HEVC standard.These in-loop filters are applied in the encoder and the decoder. SAOmay be applied to reconstructed pixels after application of a deblockingfilter. In general, SAO involves adding an offset to compensate forintensity shift directly to a reconstructed pixel. The value of theoffset depends on the local characteristics surrounding the pixel, i.e.,edge direction/shape and/or pixel intensity level. There are twotechniques used for determining offset values: band offset (BO) and edgeoffset (EO). In previous HEVC specifications, e.g., WD4 and WD5, forpurposes of SAO, seven SAO filter types are defined: two types of BO,four types of EO, and one type for no SAO. These types are described inmore detail below.

The encoder divides a reconstructed picture into LCU-aligned regionsaccording to a top-down quadtree partitioning and decides which of theSAO filter types is to be used for each region. Each region in apartitioning contains one or more LCUs. More specifically, the encoderdecides the best LCU quadtree partitioning and the SAO filter type andassociated offsets for each region based on a rate distortion techniquethat estimates the coding cost resulting from the use of each SAO filtertype. For each possible region partitioning, the encoder estimates thecoding costs of the SAO parameters, e.g., the SAO filter type and SAOoffsets, resulting from using each of the predefined SAO filter typesfor each region, selects the SAO filter type with the lowest cost forthe region, and estimates an aggregate coding cost for the partitioningfrom the region coding costs. The partitioning with the lowest aggregatecost is selected for the picture.

For BO, the pixels of a region are classified into multiple bands whereeach band contains pixels in the same intensity interval. That is, theintensity range is equally divided into 32 bands from zero to themaximum intensity value (e.g., 255 for 8-bit pixels). Based on theobservation that an offset tends to become zero when the number ofpixels in a band is large, especially for central bands, the 32 bandsare divided into two groups, the central 16 bands and two side bands asshown in FIG. 1 . Each pixel in a region is classified according to itsintensity into one of two categories: the side band group or the centralband group. The five most significant bits of a pixel are used as theband index for purposes of classification. An offset is also determinedfor each band of the central group and each band of the side band group.The offset for a band may be computed as an average of the differencesbetween the original pixel values and the reconstructed pixel values ofthe pixels in the region classified into the band.

For EO, pixels in a region are classified based on a one dimensional(1-D) delta calculation. That is, the pixels can be filtered in one offour edge directions (0, 90, 135, and 45) as shown in FIG. 2A. For eachedge direction, a pixel is classified into one of five categories basedon the intensity of the pixel relative to neighboring pixels in the edgedirection. Categories 1-4 each represent specific edge shapes as shownin FIG. 2B while category 0 is indicative that none of these edge shapesapplies. Offsets for each of categories 1-4 are also computed after thepixels are classified.

More specifically, for each edge direction, a category number c for apixel is computed as c=sign(p0−p1)+sign (p0−p2) where p0 is the pixeland p1 and p2 are neighboring pixels as shown in FIG. 2A. The edgeconditions that result in classifying a pixel into a category are shownin Table 1 and are also illustrated in FIG. 2B. After the pixels areclassified, offsets are generated for each of categories 1-4. The offsetfor a category may be computed as an average of the differences betweenthe original pixel values and the reconstructed pixel values of thepixels in the region classified into the category.

TABLE 1 Category Condition 1 p0 < p1 and p0 < p2 2 (p0 < p1 and p0 = p2)or (p0 < p2 and p0 = p1) 3 (p0 > p1 and p0 = p2) or (p0 > p2 and p0 =p1) 4 p0 > p1 and p0 > p2 0 none of above

Once the partitioning of the LCUs into regions and the SAO filter typeand offsets for each region are determined, the encoder applies theselected SAO offsets to the reconstructed picture according to theselected LCU partitioning and selected SAO filter types for each regionin the partitioning. The offsets are applied as follows. If SO type 0 isselected for a region, no offset is applied. If one of SAO filter types1-4 is selected for a region, for each pixel in the region, the categoryof the pixel (see Table 1) is determined as previously described and theoffset for that category is added to the pixel. If the pixel is incategory 0, no offset is added.

If one of the two BO SAO filter types, i.e., SAO filter types 5 and 6,is selected for a region, for each pixel in the region, the band of thepixel is determined as previously described. If the pixel is in one ofthe bands for the SAO filter type, i.e., one of the central bands forSAO filter type 5 or one of the side bands for SAO filter type 6, theoffset for that band is added to the pixel; otherwise, the pixel is notchanged.

Further, for each picture, the encoder signals SAO parameters such asthe LCU region partitioning for SAO, the SAO filter type for each LCUregion, and the offsets for each LCU region in the encoded bit stream.Table 2 shows the SAO filter types (sao_type_idx) and the number of SAOoffsets (NumSaoCategory) that are signaled for each filter type. Notethat as many as sixteen offsets may be signaled for a region. For SAOfilter types 1-4, the four offsets are signaled in category order (seeTable 1). For SAO filter types 5 and 6, the 16 offsets are signaled inband order (lowest to highest).

TABLE 2 sao_type_idx NumSaoCategory Edge type 0 0 Not applied 1 4 1D0-degree edge 2 4 1D 90-degree edge 3 4 1D 135-degree edge 4 4 1D45-degree edge 5 16 Central band 6 16 Side band

In a decoder, the SAO parameters for a slice are decoded, and SAOfiltering is applied according to the parameters. That is, the decoderapplies SAO offsets to the LCUs in the slice according to the signaledregion partitioning for the picture and the signaled SAO filter type andoffsets for each of the regions. The offsets for a given region areapplied in the same way as previously described for the encoder.

As illustrated in FIG. 3 , the SAO parameters for LCUs in a picture areencoded in the slice header; thus, in a decoder, a delay in LCUprocessing is incurred as all data for SAO of LCUs in an entire picturehas to be decoded and stored before processing of the LCU data in theslice data can begin. Moreover, the decoded SAO parameters for theentire picture have to be stored before LCU decoding is started, whichmay increase the memory requirements in a decoder. Encoding the SAOparameters in the slice header also causes a delay in processing in theencoder since the encoder cannot complete the SAO parameter portion ofthe slice header until after the SAO parameters for a picture aredetermined.

Embodiments of the invention provide alternative techniques forsignaling of SAO parameters. In some embodiments, rather than signalingthe SAO parameters on a slice basis, which requires signaling of the LCUregion partition information for each picture, the needed SAOinformation is signaled for each LCU. This eliminates the need to signalthe region partitioning of a picture. Further, as shown in the exampleof FIG. 4 , the SAO information for each LCU is interleaved with the LCUdata rather than being encoded in the slice header. In some embodiments,the SAO information for an LCU may immediately precede the LCU data inthe encoded bit stream as shown in FIG. 4 . In some embodiments, the SAOinformation may immediately follow the LCU data in the encoded bitstream.

Further, in some embodiments, rather than directly encoding the valuesof the LCU SAO parameters in the LCU SAO information in the bit stream,the values of some or all of the SAO parameters may be predictedaccording to an agreed upon prediction protocol between the encoder andthe decoder and one or more prediction indicators encoded in the LCU SAOinformation in lieu of the actual values to reduce the number of bits tobe encoded. In essence, depending on the prediction protocol, one ormore prediction indicators indicate to the decoder how an actualparameter value (or more than one actual parameter value) is to bedetermined.

As used herein in describing various embodiments, the term “SAOparameters” refers to parameters of an SAO implementation that togetherindicate the type of filtering to be applied, i.e., BO or EO, the offsetvalues to be used, and any other information needed in order to applythe offset values. SAO may be implemented in different ways and thenumber of parameters and the semantics of the parameters are defined bythe implementation. For example, in the SAO previously described herein,the parameters are a filter type and the offset values for that filtertype. Further, the semantics of the filter type parameter are such thatedge direction is communicated for EO type filtering and the bands towhich offsets are to be applied are communicated for BO type filtering(see Table 2). In addition, the semantics of the filter type parameteralso communicate the number of offsets.

In another example, the parameters of the SAO in HEVC Draft 8 are asfollows: 1) a filter type that is 0 if no SAO is to be applied,1 for BOtype filtering, and 2 for EO type filtering; 2) four offset values thatare the absolute values of the actual offset values; 3) the signs ofeach non-zero offset value (for BO type filtering); 4) a band position(for BO type filtering) indicating the left-most band of fourconsecutive bands where the offsets are to be applied; and 5) an EOclass (for EO type filtering) that indicates the edge direction (SeeTable 3). The signs for the offset values for EO type filtering areinferred from the category, i.e., plus for categories 1 and 2, and minusfor categories 3 and 4.

TABLE 3 EO Class Edge Direction 0 1D 0-degree edge offset 1 1D 90-degreeedge offset 2 1D 135-degree edge offset 3 1D 45-degree edge offset

Unless otherwise explicitly stated herein, embodiments of the inventionare not limited to any particular SAO parameter set/SAO implementation.

As used herein in describing various embodiments, the term “SAOinformation” refers to the data that is encoded in the video bit streamto communicate the SAO parameters to a decoder. The “SAO information”may be different in different embodiments. For example, SAO informationmay be the directly encoded SAO parameters, one or more predictionindicators, or a combination there of.

FIG. 5 shows a block diagram of a digital system that includes a sourcedigital system 500 that transmits encoded video sequences to adestination digital system 502 via a communication channel 516. Thesource digital system 500 includes a video capture component 504, avideo encoder component 506, and a transmitter component 508. The videocapture component 504 is configured to provide a video sequence to beencoded by the video encoder component 506. The video capture component504 may be, for example, a video camera, a video archive, or a videofeed from a video content provider. In some embodiments, the videocapture component 504 may generate computer graphics as the videosequence, or a combination of live video, archived video, and/orcomputer-generated video.

The video encoder component 506 receives a video sequence from the videocapture component 504 and encodes it for transmission by the transmittercomponent 508. The video encoder component 506 receives the videosequence from the video capture component 504 as a sequence of pictures,divides the pictures into largest coding units (LCUs), and encodes thevideo data in the LCUs. The video encoder component 506 may beconfigured to perform SAO filtering and SAO parameter signaling duringthe encoding process as described herein. An embodiment of the videoencoder component 506 is described in more detail herein in reference toFIG. 6 .

The transmitter component 508 transmits the encoded video data to thedestination digital system 502 via the communication channel 516. Thecommunication channel 516 may be any communication medium, orcombination of communication media suitable for transmission of theencoded video sequence, such as, for example, wired or wirelesscommunication media, a local area network, or a wide area network.

The destination digital system 502 includes a receiver component 510, avideo decoder component 512 and a display component 514. The receivercomponent 510 receives the encoded video data from the source digitalsystem 500 via the communication channel 516 and provides the encodedvideo data to the video decoder component 512 for decoding. The videodecoder component 512 reverses the encoding process performed by thevideo encoder component 506 to reconstruct the LCUs of the videosequence. The video decoder component 512 may be configured to performSAO filtering during the decoding process as described herein. Anembodiment of the video decoder component 512 is described in moredetail below in reference to FIG. 8 .

The reconstructed video sequence is displayed on the display component514. The display component 514 may be any suitable display device suchas, for example, a plasma display, a liquid crystal display (LCD), alight emitting diode (LED) display, etc.

In some embodiments, the source digital system 500 may also include areceiver component and a video decoder component and/or the destinationdigital system 502 may include a transmitter component and a videoencoder component for transmission of video sequences both directionsfor video steaming, video broadcasting, and video telephony. Further,the video encoder component 506 and the video decoder component 512 mayperform encoding and decoding in accordance with one or more videocompression standards. The video encoder component 506 and the videodecoder component 512 may be implemented in any suitable combination ofsoftware, firmware, and hardware, such as, for example, one or moredigital signal processors (DSPs), microprocessors, discrete logic,application specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), etc.

FIG. 6 shows a block diagram of the LCU processing portion of an examplevideo encoder. A coding control component (not shown) sequences thevarious operations of the LCU processing, i.e., the coding controlcomponent runs the main control loop for video encoding. The codingcontrol component receives a digital video sequence and performs anyprocessing on the input video sequence that is to be done at the picturelevel, such as determining the coding type (I, P, or B) of a picturebased on the high level coding structure, e.g., IPPP, IBBP,hierarchical-B, and dividing a picture into LCUs for further processing.

In addition, for pipelined architectures in which multiple LCUs may beprocessed concurrently in different components of the LCU processing,the coding control component controls the processing of the LCUs byvarious components of the LCU processing in a pipeline fashion. Forexample, in many embedded systems supporting video processing, there maybe one master processor and one or more slave processing modules, e.g.,hardware accelerators. The master processor operates as the codingcontrol component and runs the main control loop for video encoding, andthe slave processing modules are employed to off load certaincompute-intensive tasks of video encoding such as motion estimation,motion compensation, intra prediction mode estimation, transformationand quantization, entropy coding, and loop filtering. The slaveprocessing modules are controlled in a pipeline fashion by the masterprocessor such that the slave processing modules operate on differentLCUs of a picture at any given time. That is, the slave processingmodules are executed in parallel, each processing its respective LCUwhile data movement from one processor to another is serial.

The LCU processing receives LCUs of the input video sequence from thecoding control component and encodes the LCUs under the control of thecoding control component to generate the compressed video stream. TheLCUs in each picture are processed in row order. The CUs in the CUstructure of an LCU may be processed by the LCU processing in adepth-first Z-scan order. The LCUs 600 from the coding control unit areprovided as one input of a motion estimation component 620, as one inputof an intra-prediction component 624, and to a positive input of acombiner 602 (e.g., adder or subtractor or the like). Further, althoughnot specifically shown, the prediction mode of each picture as selectedby the coding control component is provided to a mode selector componentand the entropy encoder 634.

The storage component 618 provides reference data to the motionestimation component 620 and to the motion compensation component 622.The reference data may include one or more previously encoded anddecoded pictures, i.e., reference pictures.

The motion estimation component 620 provides motion data information tothe motion compensation component 622 and the entropy encoder 634. Morespecifically, the motion estimation component 620 performs tests on CUsin an LCU based on multiple inter-prediction modes (e.g., skip mode,merge mode, and normal or direct inter-prediction), PU sizes, and TUsizes using reference picture data from storage 618 to choose the bestCU partitioning, PU/TU partitioning, inter-prediction modes, motionvectors, etc. based on a rate distortion coding cost. To perform thetests, the motion estimation component 620 may divide an LCU into CUsaccording to the maximum hierarchical depth of the quadtree, and divideeach CU into PUs according to the unit sizes of the inter-predictionmodes and into TUs according to the transform unit sizes, and calculatethe coding costs for each PU size, prediction mode, and transform unitsize for each CU.

The motion estimation component 620 provides the motion vector (MV) orvectors and the prediction mode for each PU in the selected CUpartitioning to the motion compensation component 622 and the selectedCU/PU/TU partitioning with corresponding motion vector(s), referencepicture index (indices), and prediction direction(s) (if any) to theentropy encoder 634.

The motion compensation component 622 provides motion compensatedinter-prediction information to the mode decision component 626 thatincludes motion compensated inter-predicted PUs, the selectedinter-prediction modes for the inter-predicted PUs, and corresponding TUsizes for the selected CU partitioning. The coding costs of theinter-predicted CUs are also provided to the mode decision component626.

The intra-prediction component 624 provides intra-prediction informationto the mode decision component 626 and the entropy encoder 634. Morespecifically, the intra-prediction component 624 performsintra-prediction in which tests on CUs in an LCU based on multipleintra-prediction modes, PU sizes, and TU sizes are performed usingreconstructed data from previously encoded neighboring CUs stored in thebuffer 628 to choose the best CU partitioning, PU/TU partitioning, andintra-prediction modes based on a rate distortion coding cost. Toperform the tests, the intra-prediction component 624 may divide an LCUinto CUs according to the maximum hierarchical depth of the quadtree,and divide each CU into PUs according to the unit sizes of theintra-prediction modes and into TUs according to the transform unitsizes, and calculate the coding costs for each PU size, prediction mode,and transform unit size for each PU. The intra-prediction informationprovided to the mode decision component 626 includes the intra-predictedPUs, the selected intra-prediction modes for the PUs, and thecorresponding TU sizes for the selected CU partitioning. The codingcosts of the intra-predicted CUs are also provided to the mode decisioncomponent 626. The intra-prediction information provided to the entropyencoder 634 includes the selected CU/PU/TU partitioning withcorresponding intra-prediction modes.

The mode decision component 626 selects between intra-prediction of a CUand inter-prediction of a CU based on the intra-prediction coding costof the CU from the intra-prediction component 624, the inter-predictioncoding cost of the CU from the inter-prediction component 620, and thepicture prediction mode provided by the mode selector component. Basedon the decision as to whether a CU is to be intra- or inter-coded, theintra-predicted PUs or inter-predicted PUs are selected, accordingly.

The output of the mode decision component 626, i.e., the predicted PUs,is provided to a negative input of the combiner 602 and to a delaycomponent 630. The associated transform unit size is also provided tothe transform component 604. The output of the delay component 630 isprovided to another combiner (i.e., an adder) 638. The combiner 602subtracts each predicted PU from the original PU to provide residual PUsto the transform component 604. Each resulting residual PU is a set ofpixel difference values that quantify differences between pixel valuesof the original PU and the predicted PU. The residual blocks of all thePUs of a CU form a residual CU block for the transform component 604.

The transform component 604 performs block transforms on the residual CUto convert the residual pixel values to transform coefficients andprovides the transform coefficients to a quantize component 606. Morespecifically, the transform component 604 receives the transform unitsizes for the residual CU and applies transforms of the specified sizesto the CU to generate transform coefficients.

The quantize component 606 quantizes the transform coefficients based onquantization parameters (QPs) and quantization matrices provided by thecoding control component and the transform sizes. The quantizedtransform coefficients are taken out of their scan ordering by a scancomponent 608 and arranged sequentially for entropy coding. In essence,the coefficients are scanned backward in highest to lowest frequencyorder until a coefficient with a non-zero value is located. Once thefirst coefficient with a non-zero value is located, that coefficient andall remaining coefficient values following the coefficient in thehighest to lowest frequency scan order are serialized and passed to theentropy encoder 634.

The entropy encoder 634 entropy encodes the relevant data, i.e., syntaxelements, output by the various encoding components and the codingcontrol component to generate the compressed video bit stream that isprovided to a video buffer 636 for transmission or storage. The syntaxelements are encoded according to the syntactical order specified inHEVC. This syntactical order specifies the order in which syntaxelements should occur in a compressed video bit stream. Among the syntaxelements that are encoded are flags indicating the CU/PU/TU partitioningof an LCU, the prediction modes for the CUs, and the ordered quantizedtransform coefficients for the CUs. The entropy encoder 634 also codesrelevant data from the in-loop filtering component 616 such as the LCUspecific SAO information for each LCU. The LCU SAO information issignaled on an LCU-by-LCU basis rather than all together in sliceheaders as in the prior art. In some embodiments, the SAO informationfor an LCU may immediately precede the LCU data in the encoded bitstream as shown in FIG. 4 . In some embodiments, the SAO information mayimmediately follow the LCU data in the encoded bit stream.

The LCU processing includes an embedded decoder. As any compliantdecoder is expected to reconstruct an image from a compressed bitstream, the embedded decoder provides the same utility to the videoencoder. Knowledge of the reconstructed input allows the video encoderto transmit the appropriate residual energy to compose subsequentpictures. To determine the reconstructed input, i.e., reference data,the ordered quantized transform coefficients for a CU provided via thescan component 608 are returned to their original post-transformarrangement by an inverse scan component 610, the output of which isprovided to a dequantize component 612, which outputs a reconstructedversion of the transform result from the transform component 604.

The dequantized transform coefficients are provided to the inversetransform component 614, which outputs estimated residual informationrepresenting a reconstructed version of a residual CU. The inversetransform component 614 receives the transform unit size used togenerate the transform coefficients and applies inverse transform(s) ofthe specified size to the transform coefficients to reconstruct theresidual values.

The reconstructed residual CU is provided to the combiner 638. Thecombiner 638 adds the delayed selected CU to the reconstructed residualCU to generate a reconstructed CU, which becomes part of reconstructedpicture data. The reconstructed picture data is stored in a buffer 628for use by the intra-prediction component 624 and is provided to anin-loop filter component 616.

The in-loop filter component 616 applies various filters to thereconstructed picture data to improve the quality of the referencepicture data used for encoding/decoding of subsequent pictures. FIG. 7shows the in-loop filter component 616 in more detail. The filters inthe in-loop filter component 616 include a deblocking filter 704 and asample adaptive offset filter (SAO) 706. The in-loop filter component616 may apply these filters, for example, on an LCU-by-LCU basis. Thetwo filters may be applied sequentially as shown in FIG. 7 . That is,the deblocking filter 704 may be first applied to the reconstructeddata. Then, the SAO 706 may be applied to the deblocked reconstructedpicture data. Referring again to FIG. 6 , the final filtered referencepicture data is provided to storage component 618.

The deblocking filter 704 operates to smooth discontinuities at blockboundaries, i.e., TU and CU block boundaries, in a reconstructedpicture. In general, for each LCU of the reconstructed picture, the SAOfilter 706 determines the best offset values, i.e., band offset valuesor edge offset values, to be added to pixels of that LCU to compensatefor intensity shift that may have occurred during the block based codingof the picture, applies the offset values to the reconstructed LCU, anddetermines the SAO information to be encoded in the bit stream for theLCU. The operation of embodiments of the SAO filter 706 of the in-loopfilter component 616 is described in more detail herein in reference tothe method of FIG. 10 .

FIG. 8 shows a block diagram of an example video decoder. The videodecoder operates to reverse the encoding operations, i.e., entropycoding, quantization, transformation, and prediction, performed by thevideo encoder of FIG. 6 to regenerate the pictures of the original videosequence. In view of the above description of a video encoder, one ofordinary skill in the art will understand the functionality ofcomponents of the video decoder without detailed explanation.

The entropy decoding component 800 receives an entropy encoded(compressed) video bit stream and reverses the entropy coding to recoverthe encoded PUs and header information such as the prediction modes, theencoded CU and PU structures of the LCUs, and the LCU specific SAOinformation for each LCU. If the decoded prediction mode is aninter-prediction mode, the entropy decoder 800 then reconstructs themotion vector(s) as needed and provides the motion vector(s) to themotion compensation component 810.

The inverse quantization component 802 de-quantizes the quantizedtransform coefficients of the residual CU. The inverse transformcomponent 804 transforms the frequency domain data from the inversequantization component 802 back to the residual CU. That is, the inversetransform component 804 applies an inverse unit transform, i.e., theinverse of the unit transform used for encoding, to the de-quantizedresidual coefficients to produce the residual CUs.

A residual CU supplies one input of the addition component 806. Theother input of the addition component 806 comes from the mode switch808. When an inter-prediction mode is signaled in the encoded videostream, the mode switch 808 selects predicted PUs from the motioncompensation component 810 and when an intra-prediction mode issignaled, the mode switch selects predicted PUs from theintra-prediction component 814.

The motion compensation component 810 receives reference data fromstorage 812 and applies the motion compensation computed by the encoderand transmitted in the encoded video bit stream to the reference data togenerate a predicted PU. That is, the motion compensation component 810uses the motion vector(s) from the entropy decoder 800 and the referencedata to generate a predicted PU.

The intra-prediction component 814 receives reconstructed samples frompreviously reconstructed PUs of a current picture from the buffer 807and performs the intra-prediction computed by the encoder as signaled byan intra-prediction mode transmitted in the encoded video bit streamusing the reconstructed samples as needed to generate a predicted PU.

The addition component 806 generates a reconstructed CU by adding thepredicted PUs selected by the mode switch 808 and the residual CU. Theoutput of the addition component 806, i.e., the reconstructed CUs,supplies the input of the in-loop filter component 816 and is alsostored in the buffer 807 for use by the intra-prediction component 814.

The in-loop filter component 816 applies the same filters to thereconstructed picture data as the encoder, i.e., a deblocking filter andSAO, in the same order to improve the quality of the reconstructedpicture data. The output of the in-loop filter component 816 is thedecoded pictures of the video bit stream. Further, the output of thein-loop filter component 816 is stored in storage 812 to be used asreference data by the motion compensation component 810.

FIG. 9 shows the in-loop filter component 816 in more detail. Thefilters in the in-loop filter component 816 include a deblocking filter904 and a sample adaptive offset filter (SAO) 906. The deblocking filter904 operates in the same manner as the deblocking filter of the encoder.In general, for each reconstructed LCU, the SAO filter 906 applies theoffset values determined by the encoder for the LCU to the pixels of theLCU. More specifically, the SAO filter 906 receives decoded LCU specificSAO information from the entropy decoding component 800 for eachreconstructed LCU, determines the SAO parameters for the LCU from theSAO information, and applies the determined offset values to the pixelsof the LCU according to values of other parameters in the SAO parameterset. The operation of embodiments of the SAO filter 906 of the in-loopfilter component 816 for each LCU is described in more detail herein inreference to the method of FIG. 12 .

FIG. 10 is a flow diagram of a method for SAO filtering and SAOparameter signaling that may be performed in a video encoder, e.g., theencoder of FIG. 6 . In general, in this method, SAO parameters aredetermined for each LCU in a picture, SAO filtering is performed on eachLCU according to the SAO parameters determined for the LCU, and SAOinformation for each LCU is encoded in the bit stream interleaved withthe LCU data. In an encoder, method steps 1000 and 1002 may be performedby an SAO filter, e.g., SAO 706 of FIG. 7 , and method step 1004 may beperformed by an entropy encoder, e.g., entropy encoder 634 of FIG. 6 .

Referring now to FIG. 10 , SAO parameters are determined 1000 for LCUsin a reconstructed picture (after a deblocking filter is applied). Thatis, SAO parameters are determined for each LCU in the reconstructedpicture. Any suitable technique may be used for determining the LCU SAOparameters. For example, a region-based approach for determining SAOparameters that uses quadtree partitioning such as the one previouslydescribed herein may be used. In such an approach, the same SAOparameters are used for all LCUs in a region. In another example, afixed picture partitioning that is LCU-aligned may be used in which SAOparameters are determined for each partition. The same SAO parameterswould apply to all LCUs in a partition. In another example, SAOparameters may be determined individually for each LCU.

Once the SAO parameters for an LCU are determined, the SAO informationto be encoded in the bit stream for that LCU is also determined. In someembodiments, the actual values of the SAO parameters determined for anLCU are the SAO information for the LCU. As is explained in more detailbelow, in some embodiments, a prediction protocol may be used to predictsome or all of the SAO parameters for an LCU in order to reduce the sizeof the SAO information encoded in the bit stream. In such embodiments,the SAO information for an LCU is determined according to the predictionprotocol.

SAO filtering is then performed 1002 on the reconstructed pictureaccording to the SAO parameters determined for the LCUs. Morespecifically, SAO filtering is performed on each LCU according to theparticular SAO parameters determined for that LCU. In general, the SAOfiltering applies the specified offsets in the SAO parameters to pixelsin the LCU according to the filter type indicated in the SAO parameters.

The LCU specific SAO information for each LCU is also entropy coded 1004into the compressed bit stream on an LCU by LCU basis, i.e., the LCUspecific SAO information is interleaved with the LCU data rather thanbeing encoded in the slice header as in the prior art. In someembodiments, the SAO information for an LCU may immediately precede theLCU data in the encoded bit stream as shown in the example of FIG. 4 .In some embodiments, the SAO information may immediately follow the LCUdata in the encoded bit stream.

Direct encoding of the SAO parameters for each LCU may increase theencoded bit stream size over the prior art in which SAO parameters forregions were coded instead. To reduce the number of bits needed forencoding SAO parameters, rather than encoding the values of some or allof the LCU SAO parameters, in some embodiments of the method of FIG. 10, the values may be predicted according to an agreed upon predictionprotocol between the encoder and the decoder and prediction indicatorsencoded in lieu of the actual values to reduce the number of bits to beencoded. In essence, depending on the prediction protocol, one orprediction indicators indicate to the decoder how an actual parametervalue (or more than one actual parameter value) is to be determined.

In some embodiments, offset values are predicted based on previouslyencoded offset values and the differences (deltas) signaled asprediction indicators for the offset values. In such embodiments, theSAO information for an LCU includes the prediction indicators in lieu ofthe offset values. In some such embodiments, a prediction indicator foran offset value is the delta between the offset value and the previouslyencoded offset value. More specifically, the offset values for an LCUmay be signaled in a known order. The actual value of the first offsetvalue is encoded. The absolute value of this first offset value is thenused as the predictor for the second offset value. The differencebetween the absolute value of the first offset value and the actualsecond offset value is determined, and this delta is encoded as theprediction indicator for the second offset value. The absolute value ofthis delta is then used as the predictor for the third offset value. Thedifference between the absolute value of the delta and the actual valueof the third offset value is determined, and this delta is encoded asthe prediction indicator for the third offset value. This process isrepeated for each of the remaining offset values. For example, dependingon the particular SAO implementation, there may be 16 SAO offsets to besignaled (see Table 2). The agreed upon order for signaling theseoffsets may be according to band order from lowest band number tohighest band number. If the offsets are 2, 2, 4, 5, 6, 6, 7, 7, 3, 12,2, 2, 3, 6, 6, 7, these offset values would be signaled as deltas(prediction indicators) 2, 0, 2, 1, 1, 0, 1, 0, −4, 9, 10, 0, 1, 3, 0,1.

In some embodiments, a prediction protocol for LCU SAO parameters may beused in which an LCU is “merged” with a neighboring LCU in the sameslice, i.e., a spatially neighboring LCU, such that the LCU shares theSAO parameters of the neighboring LCU. In general, the SAO parameters ofthe neighboring LCU serve as the predictors for the SAO parameters ofthe LCU if the SAO parameters of the LCU and the neighboring LCU are thesame. In such a prediction protocol, a merge indicator, e.g., a mergeflag, is encoded for each LCU to indicate whether or not merging isused. If merging is used, the SAO parameters of the LCU are not encoded.If merging is not used, the actual SAO parameters of the LCU are encodedin addition to the merge indicator.

Different schemes may be used to identify a neighboring LCU for possiblemerging. For example, in some embodiments, a single neighboring LCU,e.g., the immediate left neighboring LCU or the immediate topneighboring LCU, may be considered for merging with the current LCU. Ifthe SAO parameters of the current LCU and the single neighboring LCU arethe same, the merge indicator is set to indicate merging of the currentLCU and is encoded in the bit stream. The actual SAO parameters for thecurrent LCU need not be signaled as the decoder can use the SAOparameters of the neighboring LCU. If the SAO parameters of the currentLCU and the single neighboring LCU are not the same or the neighboringLCU is not available, e.g., the current LCU is at a left or top sliceboundary, the merge indicator is set to indicate no merging and themerge indicator and the other SAO parameters of the current LCU areencoded in the bit stream.

In some embodiments, multiple spatially neighboring LCUs, i.e., two ormore neighboring LCUs, may be considered for merging with the currentLCU. In such embodiments, the SAO parameters of the current LCU arecompared to the SAO parameters of each of the spatially neighboring LCUcandidates (if available) in a specified order, and the firstneighboring LCU with matching parameters, if any, is selected formerging with the current LCU. If a match is found, an identifier for theselected neighboring LCU, e.g., an index, is encoded in the bit streamalong with the merge indicator set to indicate merging. If no match isfound, a merge indicator set to indicate no merging is encoded in thebit stream along with the other SAO parameters of the current LCU.

For example, in some embodiments, the four spatially neighboring LCUsindicated in FIG. 5 may be considered for merging with the current LCU.In this figure, the X denotes the current LCU and the numbered blocksare the spatially neighboring LCUs to be considered. Note that dependingon the location of the current LCU in the slice, one or more of thesespatially neighboring LCUs may not be available. For example, if thecurrent LCU is at the left boundary of the slice, neighboring LCU 0 andneighboring LCU 2 will not be available to be considered for mergingwith the current LCU. The number inside each block indicates the orderin which the neighboring LCUs are to be considered for merging with thecurrent LCU. This number also serves as an index to identify theneighboring LCU to the decoder if that LCU is selected for merging. Insome embodiments, a subset of these spatially neighboring LCUs may beused. For example, only LCU 0 (the immediate left neighboring LCU) andLCU 1 (the immediate top neighboring LCU) may be considered for merging.

In some embodiments, a prediction protocol for LCU SAO parameters may beused in which an LCU is “merged” with a temporally co-located LCU suchthat the LCU shares the SAO parameters of the co-located LCU. Ingeneral, a co-located LCU or temporally co-located LCU is a square areain a reference picture having the same coordinates, size, and shape ofan LCU in a picture currently being encoded or decoded. For purposes ofmerging, the temporally co-located LCU for a current LCU is a squarearea in a reference picture having the same coordinates, size, and shapeof the current LCU. If the SAO parameters of the current LCU and theco-located LCU are the same, the merge indicator is set to indicatemerging of the current LCU and is encoded in the bit stream. The actualSAO parameters for the current LCU need not be signaled as the decodercan use the SAO parameters of the co-located LCU. If the SAO parametersof the current LCU and the co-located LCU are not the same or theco-located LCU is not available, the merge indicator is set to indicateno merging and the merge indicator and the other SAO parameters of thecurrent LCU are encoded in the bit stream.

In some embodiments, a prediction protocol for LCU SAO parameters may beused in which multiple spatially neighboring LCUS and the co-located LCUare considered for merging with the current LCU. In some suchembodiments, the SAO parameters of the current LCU are compared to theSAO parameters of each of the spatially neighboring LCU candidates andthe co-located LCU (if available) in a specified order, and the firstLCU candidate with matching parameters, if any, is selected for mergingwith the current LCU. If a match is found, an identifier for theselected candidate LCU, e.g., an index, is encoded in the bit streamalong with the merge indicator set to indicate merging. If no match isfound, a merge indicator set to indicate no merging is encoded in thebit stream along with the other SAO parameters of the current LCU.

For example, in some embodiments, the spatially neighboring LCUs may bethe LCUs indicated in FIG. 5 with the ordering as indicated in FIG. 5and the co-located LCU may be assigned an index of 4, making it the lastLCU to be considered. An SAO merge candidate list is constructed byconsidering each of the five candidate LCUs in the order specified. If acandidate LCU is available, it is added as the next entry in the SAOmerge candidate list. Thus, if all five candidate LCUs are available,the ordered candidate LCUs in the SAO merge list will be LCU 0, LCU 1LCU 2, LCU 3, and the temporally co-located LCU, LCU 4. If, for example,LCU 0 and LCU 2 are not available, the ordered candidate LCUs in the SAOmerge list will be LCU 1, LCU 3, and LCU 4.

The SAO parameters are then compared to the SAO parameters of eachcandidate LCU in the SAO merge candidate list in order. The firstcandidate LCU in the list having the same SAO parameters, if any, isselected for merging with the current LCU. If a match is found, anidentifier for the selected LCU candidate, e.g., the index of thelocation of the selected LCU candidate in the SAO merge candidate list,is encoded in the bit stream along with the merge indicator set toindicate merging. If no match is found, a merge indicator set toindicate no merging is encoded in the bit stream along with the SAOparameters of the current LCU. In some embodiments, if only one of thecandidate LCUs was available, i.e., only one candidate LCU was in theconstructed SAO merge candidate list, and the SAO parameters matched,the LCU candidate identifier is not encoded in the bit stream, i.e.,only a merge indicator set to indicate merging is encoded.

In some embodiments, a prediction protocol for LCU SAO parameters may beused in which the parameters of multiple reference LCUs are combined topredict the SAO parameters of the current LCU. The reference LCUs may bespatially neighboring LCUs or may be spatially neighboring LCUs and thetemporally co-located LCU. On the encoder side, an SAO filter type forthe current LCU is selected as the one occurring most frequently in theparameters of the reference LCUs. If two or more filter types occur withthe same frequency, the one with the smaller filter type index ischosen. The value of each offset for the current LCU is then computed asthe average value of that offset in each of the reference LCUs havingthe filter type selected. The encoder then uses some criteria, e.g.,coding cost, to decide whether these predicted parameters or the actualSAO parameters of the LCU should be used. If the predicted parametersare chosen, the merge indicator is set to indicate merging and isencoded in the bit stream. If the actual SAO parameters are chosen, themerge indicator is set to indicate no merging and is encoded in the bitstream along with the actual SAO parameters. In addition, the predictedparameters would be used to apply SAO filtering to the LCU in theencoder rather than the actual SAO parameters Note that on the decoderside, if merging is indicated, the decoder would repeat the process usedin the encoder to determine the predicted parameters.

FIG. 12 is a flow diagram of a method for SAO filtering that may beperformed in a video decoder, e.g., the decoder of FIG. 8 . In general,in this method, the SAO information for an LCU encoded in a compressedvideo bit stream as per an embodiment of the method of FIG. 10 isentropy decoded, the SAO parameters for the LCU are determined from thedecoded SAO information, and SAO filtering is performed on thereconstructed LCU according to the determined SAO parameters. In a videodecoder, method steps 1202 and 1204 may be performed by an SAO filter,e.g., SAO 906 of FIG. 9 , and method step 11200 may be performed by anentropy decoder, e.g., entropy decoder 800 of FIG. 8 .

Referring now to FIG. 12 , initially the SAO information for an LCU isentropy decoded 1200. In some embodiments, the SAO information for theLCU is the actual values of the SAO parameters determined for the LCU bythe encoder. In some embodiments, the content of the SAO information forthe LCU corresponds to a prediction protocol used by the encoder topredict some or all of the SAO parameters for the LCU.

The SAO parameters for the LCU are then determined 1202 from the SAOinformation. In embodiments in which the SAO information is the directlycoded actual values of the SAO parameters for the LCU, determination ofthe SAO parameter values is simple. In embodiments where the SAOinformation for the LCU corresponds to a prediction protocol, thedecoded SAO information is further analyzed according to the predictionprotocol to determine the SAO parameters. Given the benefit of theforegoing description of prediction protocols that may be used inembodiments of the encoding method of FIG. 10 , one of ordinary skill inthe art will understand how the SAO parameters may be determined usingthe decoded SAO information when these prediction protocols are used inencoding without need for further written description.

SAO filtering is then performed on the reconstructed LCU according tothe determined SAO parameters. In general, the SAO filtering applies thespecified offsets in the SAO parameters to pixels in the LCU accordingto the filter type indicated in the SAO parameters.

As is well known, a picture may include more than one color component.The aforementioned SAO information and SAO parameters can be sharedamong multiple color components. Or, alternatively, SAO parameters andSAO information may be used for each color component. In such cases, theSAO parameters and SAO information for each color component may bedetermined and signaled according to embodiments described herein. Inembodiments using one of the merging forms of prediction is used, amerge indicator may be signaled for each color component or a commonmerge indicator may be signaled for all color component. For example,one of the commonly used color formats is YCbCr. If the SAO parametersof Y, Cb, and Cr of the current LCU can be predicted by the SAOparameters of Y, Cb, and Cr in another LCU (as determined by theparticular prediction protocol), then a single merge indicator set toindicate merging is encoded in the bit stream. Otherwise, a single mergeindicator set to indicate no merging is encoded in the bit stream aswell as the SAO parameter set for Y and the SAO parameter set for Cb andCr.

FIG. 13 is a block diagram of an example digital system suitable for useas an embedded system that may be configured to perform SAO filteringand SAO parameter signaling as described herein during encoding of avideo stream and/or SAO filtering during decoding of an encoded videobit stream. This example system-on-a-chip (SoC) is representative of oneof a family of DaVinci™ Digital Media Processors, available from TexasInstruments, Inc. This SoC is described in more detail in “TMS320DM6467Digital Media System-on-Chip”, SPRS403G, December 2007 or later, whichis incorporated by reference herein.

The SoC 1300 is a programmable platform designed to meet the processingneeds of applications such as video encode/decode/transcode/transrate,video surveillance, video conferencing, set-top box, medical imaging,media server, gaming, digital signage, etc. The SoC 1300 providessupport for multiple operating systems, multiple user interfaces, andhigh processing performance through the flexibility of a fullyintegrated mixed processor solution. The device combines multipleprocessing cores with shared memory for programmable video and audioprocessing with a highly-integrated peripheral set on common integratedsubstrate.

The dual-core architecture of the SoC 1300 provides benefits of both DSPand Reduced Instruction Set Computer (RISC) technologies, incorporatinga DSP core and an ARM926EJ-S core. The ARM926EJ-S is a 32-bit RISCprocessor core that performs 32-bit or 16-bit instructions and processes32-bit, 16-bit, or 8-bit data. The DSP core is a TMS320C64x+TM core witha very-long-instruction-word (VLIW) architecture. In general, the ARM isresponsible for configuration and control of the SoC 1300, including theDSP Subsystem, the video data conversion engine (VDCE), and a majorityof the peripherals and external memories. The switched central resource(SCR) is an interconnect system that provides low-latency connectivitybetween master peripherals and slave peripherals. The SCR is thedecoding, routing, and arbitration logic that enables the connectionbetween multiple masters and slaves that are connected to it.

The SoC 1300 also includes application-specific hardware logic, on-chipmemory, and additional on-chip peripherals. The peripheral set includes:a configurable video port (Video Port I/F), an Ethernet MAC (EMAC) witha Management Data Input/Output (MDIO) module, a 4-bit transfer/4-bitreceive VLYNQ interface, an inter-integrated circuit (I2C) businterface, multichannel audio serial ports (McASP), general-purposetimers, a watchdog timer, a configurable host port interface (HPI);general-purpose input/output (GPIO) with programmable interrupt/eventgeneration modes, multiplexed with other peripherals, UART interfaceswith modem interface signals, pulse width modulators (PWM), an ATAinterface, a peripheral component interface (PCI), and external memoryinterfaces (EMIFA, DDR2). The video port I/F is a receiver andtransmitter of video data with two input channels and two outputchannels that may be configured for standard definition television(SDTV) video data, high definition television (HDTV) video data, and rawvideo data capture.

As shown in FIG. 13 , the SoC 1300 includes two high-definitionvideo/imaging coprocessors (HDVICP) and a video data conversion engine(VDCE) to offload many video and image processing tasks from the DSPcore. The VDCE supports video frame resizing, anti-aliasing, chrominancesignal format conversion, edge padding, color blending, etc. The HDVICPcoprocessors are designed to perform computational operations requiredfor video encoding such as motion estimation, motion compensation,intra-prediction, transformation, and quantization. Further, thedistinct circuitry in the HDVICP coprocessors that may be used forspecific computation operations is designed to operate in a pipelinefashion under the control of the ARM subsystem and/or the DSP subsystem.

As was previously mentioned, the SoC 1300 may be configured to performSAO filtering and SAO parameter signaling during video encoding and/orSAO filtering during decoding of an encoded video bitstream usingmethods described herein. For example, the coding control of the videoencoder of FIG. 6 may be executed on the DSP subsystem or the ARMsubsystem and at least some of the computational operations of the blockprocessing, including the intra-prediction and inter-prediction of modeselection, transformation, quantization, and entropy encoding may beexecuted on the HDVICP coprocessors. At least some of the computationaloperations of the SAO filtering and SAO parameter signaling duringencoding of a video stream may also be executed on the HDVICPcoprocessors. Similarly, at least some of the computational operationsof the various components of the video decoder of FIG. 8 , includingentropy decoding, inverse quantization, inverse transformation,intra-prediction, and motion compensation may be executed on the HDVICPcoprocessors. Further, at least some of the computational operations ofthe SAO filtering during decoding of an encoded video bit stream mayalso be executed on the HDVICP coprocessors.

OTHER EMBODIMENTS

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein.

For example, in some of the SAO prediction protocols described herein,the criteria for selecting the SAO parameters of another LCU aspredictors for the current LCU is that the parameters of the two LCUsare the same. One of ordinary skill in the art will understand otherembodiments in which criteria other than an exact match are used todecide if the SAO parameters of another LCU are to be used aspredictors. For example, the encoder could compute coding costs of usingthe SAO parameters of the neighboring LCUs and/or co-located LCU for thecurrent LCU and choose the parameters with the best coding cost as thepredictors.

In another example, particular SAO filter types, edge directions, pixelcategories, numbers of offset values, etc., drawn from versions of theemerging HEVC standard have been described above. One of ordinary skillin the art will understand embodiments in which the SAO filter types,edge directions, pixel categories, number of offset values, and/or otherspecific details of SAO filtering differ from the ones described.

Embodiments of the methods, encoders, and decoders described herein maybe implemented in hardware, software, firmware, or any combinationthereof. If completely or partially implemented in software, thesoftware may be executed in one or more processors, such as amicroprocessor, application specific integrated circuit (ASIC), fieldprogrammable gate array (FPGA), or digital signal processor (DSP). Thesoftware instructions may be initially stored in a computer-readablemedium and loaded and executed in the processor. In some cases, thesoftware instructions may also be sold in a computer program product,which includes the computer-readable medium and packaging materials forthe computer-readable medium. In some cases, the software instructionsmay be distributed via removable computer readable media, via atransmission path from computer readable media on another digitalsystem, etc. Examples of computer-readable media include non-writablestorage media such as read-only memory devices, writable storage mediasuch as disks, flash memory, memory, or a combination thereof.

Although method steps may be presented and described herein in asequential fashion, one or more of the steps shown in the figures anddescribed herein may be performed concurrently, may be combined, and/ormay be performed in a different order than the order shown in thefigures and/or described herein. Accordingly, embodiments should not beconsidered limited to the specific ordering of steps shown in thefigures and/or described herein.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe invention.

What is claimed is:
 1. A system comprising: a receiver componentconfigured to receive an encoded bit stream; and a decoder componentcoupled to the receiver component, wherein the decoder componentcomprises: an entropy decoder component configured to decode the encodedbit stream; an inverse quantization component coupled to the entropydecoder component and configured to perform an inverse quantizationfunction on at least a portion of the decoded bit stream; an inversetransform component coupled to the inverse quantization component andconfigured to perform an inverse transform on bit stream data outputfrom the inverse quantization component; a combiner component coupled tothe inverse transform component and configured to combine bit streamdata output from the inverse transform component with additional data toform a plurality of non-overlapping regions of a reconstructed picture;a deblocking filter component coupled to the combiner component andconfigured to perform deblocking filtering on the plurality ofnon-overlapping regions of the reconstructed picture; and a SAO filtercomponent coupled to the deblocking filter and configured to perform SAOfiltering on the deblocked plurality of non-overlapping regions of thereconstructed picture using SAO parameters extracted from a slice dataportion of the decoded bit stream, wherein the SAO parameters for thedeblocked plurality of the non-overlapping regions and data for thedeblocked plurality of the non-overlapping regions are interleaved inthe slice data portion of the decoded bit stream.